package com.common.util.messages;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;

public class MessagesController {

    public void addInfo(String header, String details) {  
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, header, details));  
    }  
  
    public void addWarn(String header, String details) {  
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN, header, details));  
    }  
  
    public void addError(String header, String details) {  
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, header, details));  
    }  
  
    public void addFatal(String header, String details) {  
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, header, details));  
    }  
}
